/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package DBFunction;

import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONTokener;

public class fUpdatePassword {
	public static void process(String PasswordJsonString) throws JSONException {
		JSONObject object = new JSONObject();
		object = (JSONObject) new JSONTokener(PasswordJsonString).nextValue();
		String phoneNumber = object.getString("phoneNumber");
		String newpassword = object.getString("newpaswword");
		String sql = "UPDATE buddytracking.user set Passwords='" + newpassword
				+ "' where PhoneNumber='" + phoneNumber + "'";
		DB.connectDB.Update(sql);
	}
}
